package com.ethink.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.SaleDetailOrderInfo;
import com.ethink.order.api.info.SaleOrderInfo;
import com.ethink.order.api.model.SaleOrderModeQueryModel;
import com.ethink.order.api.model.SaleOrderPageQueryModel;
import com.ethink.order.api.request.SaleOrderAddRequest;
import com.ethink.order.api.request.SaleOrderModeQueryRequest;
import com.ethink.order.api.request.SaleOrderQueryRequest;
import com.ethink.order.api.request.SaleOrderUpdateStatusRequest;
import com.ethink.order.api.response.SaleOrderAddResponse;
import com.ethink.order.api.response.SaleOrderDetailResponse;

import java.util.List;

/**
 * TOC销售单 Service接口
 *
 * @author default
 * @date 2022-11-22
 */
public interface SaleOrderService {


    SaleOrderAddResponse addSaleOrder(SaleOrderAddRequest request, Boolean isSelect);

    Page<SaleOrderPageQueryModel> pageQuerySaleOrder(SaleOrderQueryRequest request);

    Integer deleteSaleOrder(Long id);

    SaleOrderDetailResponse getSaleOrderById(Long id);

    Integer updateStatus(SaleOrderUpdateStatusRequest request);

    SaleOrderDetailResponse getSaleOrderByOrderNo(String orderNo);

    Boolean saleOrderStatusFinish(List<String> orderNo);

    /**
     * 根据预售单号查询销售详情信息
     *
     * @param orderNo
     * @return
     */
    List<SaleDetailOrderInfo> queryDetailByTobOrderNo(String orderNo);

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    Page<SaleOrderModeQueryModel> pageSaleOrderModeQuery(SaleOrderModeQueryRequest request);

    SaleOrderDetailResponse getSaleOrderByShopOrderNo(String saleSubChannel,String shopOrderNo);

    SaleOrderInfo selectSaleOrderById(Integer id);

}